package com.zhijian.medical.dao.local;

import com.zhijian.medical.entity.po.PersonCommissionAuthority;
import com.zhijian.medical.entity.vo.request.PersonCommissionAuthoritySearchVo;
import com.zhijian.medical.entity.vo.response.PersonCommissionAuthorityVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PersonCommissionAuthorityMapper {
    int deleteByPrimaryKey(Long id);

    /**
     * 根据项目id删除
     *
     * @param commissionAuthorityId
     */
    void deleteByCommissionAuthorityId(Long commissionAuthorityId);

    int insert(PersonCommissionAuthority record);

    int insertSelective(PersonCommissionAuthority record);

    PersonCommissionAuthority selectByPrimaryKey(Long id);

    /**
     * 根据人员id与项目id查找数据
     *
     * @param personId
     * @param commissionAuthorityId
     * @return
     */
    PersonCommissionAuthority selectByPersonIdAndCommissionAuthorityId(@Param("personId") Long personId, @Param("commissionAuthorityId") Long commissionAuthorityId);

    int updateByPrimaryKeySelective(PersonCommissionAuthority record);

    int updateByPrimaryKey(PersonCommissionAuthority record);

    int count(PersonCommissionAuthoritySearchVo personCommissionAuthoritySearchVo);

    List<PersonCommissionAuthorityVo> selectList(PersonCommissionAuthoritySearchVo personCommissionAuthoritySearchVo);

    PersonCommissionAuthorityVo selectVoById(Long id);
}